import axios from 'axios';

export function getProList(cat_id:any, cat_second_id :any) {
  return axios.get(
    `/admin/cat_plate_version/list?page=1&page_size=10&cat_id=${cat_id}&cat_second_id=${cat_second_id}`
  );
}
export function proList(cat_id:any, cat_second_id :any) {
  return axios.get(`/admin/cat_circuit_version/list?page=1&page_size=10&cat_id=${cat_id}&cat_second_id=${cat_second_id}`);
}

export function delProList(data) {
  return axios.post('/admin/cat_plate_version/del', data);
}

export function delList(data) {
  return axios.post('/admin/cat_circuit_version/del', data);
}

// export function addPro(data) {
//   return axios.post('/admin/cat_plate_version/add', data, {
//     headers: {
//       'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
//     },
//   });
// }

export function addPro(data) {
  return axios({
    url: '/admin/cat_plate_version/add',
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data',
    },

    data: data,
  });
}


export function addProList(data) {
  return axios({
    url: '/admin/cat_circuit_version/add',
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data',
    },

    data: data,
  });
}